<template>
    <div>
         <h3>{{text}}</h3>
    </div>
</template>

<script>
export default{
    data(){
        return{
            text:'壹言'
        }
    },
    created(){
        this.getWords();
    },
    methods:{
        getWords(){
            this.$http.get('')
            .then(res=>{
                if (res.data.code == 200) {
                    this.$Message.success("获取壹言成功！")
                    this.text = res.data.data.text;
                }else{
                    this.$Message.error("获取壹言失败！");
                }
            })
        }
    }
}
</script>
